import Vue from 'vue'
import VueRouter from 'vue-router'
// 配置路由
import Reg from '@/views/Reg/Reg.vue'
import Login from '@/views/Login/Login.vue'


Vue.use(VueRouter)

// 定义路由规则
const routes = [
  // 注册的路由
  {path:'/reg',name:'reg',component:Reg},
  // 登录的路由
  {path:'/login',name:'login',component:Login},

  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]


// 创建路由实例对象
const router = new VueRouter({
  routes
})

// 暴露路由对象
export default router
